﻿
namespace Profit.Views
{
    using System.Windows;
    using Interfaces;

    /// <summary>
    /// Interaction logic for TextView.xaml
    /// </summary>
    public partial class TextView : Window, ITextView
    {
        public TextView()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Show a dialog view
        /// </summary>
        /// <param name="parent"></param>
        /// <returns></returns>
        public bool? ShowDialog(IView parent)
        {
            this.Owner = (Window)parent;
            this.WindowStartupLocation = this.Owner == null
                                             ? WindowStartupLocation.CenterScreen
                                             : WindowStartupLocation.CenterOwner;

            return ShowDialog();
        }
    }
}
